import React, { Component } from 'react';
import {SearchbtnBox} from './style'
import icon from './search.png'
import { func, string } from 'prop-types'
class Searchbtn extends Component {
    render() {
        return (
            <SearchbtnBox onClick={this.props.onSelect}>
                <img src={icon} alt="" />
                <span>{this.props.title}</span>
            </SearchbtnBox>
        );
    }
}

Searchbtn.propsType = {
    title:string,
    onSelect:func
}
Searchbtn.defaultProps = {
    title:'搜索',
    onSelect:() => { }
}
export default Searchbtn;
